WhatsApp Template APIs
The WhatsApp Template APIs allow businesses to retrieve pre-approved WhatsApp message templates created under their WhatsApp Business account. These APIs help list available templates and fetch full details of a specific template before using it for message delivery.
Get WhatsApp Template List
Retrieves all WhatsApp message templates created for a specific business account, along with their approval status and structure.
Request Syntax
GET /api/v1/template/<BUSINESS ID>
Request headers
"x-api-key": "<API KEY>"
Response Body
{
"data": [
{
"name": "{{templateName}}",
"language": "{{language}}",
"category": "{{category}}",
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"header_handle": [
"{{headerImage}}"
]
}
},
{
"type": "BODY",
"text": "{{bodyText}}"
},
{
"type": "FOOTER",
"text": "{{footerText}}"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "{{buttonText}}",
"phone_number": "{{buttonPhoneNumber}}"
}
]
}
],
"status": "APPROVED",
"id": "{{templateId}}"
},
]
}
Properties
| Field | Description | Example |
|---|---|---|
x-api-key | API key for authentication (request header) | abc123xyz |
id | Unique WhatsApp template ID | templateId |
name | Template name | order_update |
language | Language code | en |
category | Template category | UTILITY |
status | Approval status | APPROVED |
components | Template structure | — |
Get WhatsApp Template by ID
Retrieves the complete details of a single WhatsApp template using its unique template ID.
Request Syntax
GET /api/v1/template/id/{{businessId}}?templateId={{templateId}}&analytics=true
Request headers
"x-api-key": "<API KEY>"
Response Body
{
"name": "{{templateName}}",
"language": "{{language}}",
"category": "{{category}}",
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"header_handle": [
"{{headerImage}}"
]
}
},
{
"type": "BODY",
"text": "{{bodyText}}"
},
{
"type": "FOOTER",
"text": "{{footerText}}"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "{{buttonText}}",
"phone_number": "{{buttonPhoneNumber}}"
}
]
}
],
"status": "{{status}}",
"id": "{{templateId}}"
}
Properties
| Field | Description | Example |
|---|---|---|
id | Unique WhatsApp template ID | templateId |
name | Template name | order_update |
language | Template language | en |
category | Template category | UTILITY |
status | Template approval status | APPROVED |
components | Template content structure | — |